/* $Id: SingleClientCompanyDAO.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */
package ae.pcfc.etks.online.common.dao;

import java.util.List;

import ae.pcfc.etks.online.common.domain.ClientCompanyReq;
import ae.pcfc.etks.online.common.domain.TTscClientCategory;
import ae.pcfc.etks.online.common.domain.TTscClientCompany;
import ae.pcfc.etks.online.common.domain.TTscLicType;
import ae.pcfc.etks.online.common.vo.ActivityVO;
import ae.pcfc.etks.online.common.vo.ClientNameVO;
import ae.pcfc.etks.online.common.vo.LicenseVO;
import ae.pcfc.etks.online.common.vo.NonClientCompanyVO;
import ae.pcfc.etks.online.common.vo.SearchCriteriaActivityVO;
import ae.pcfc.etks.online.common.vo.SearchCriteriaCompanyVO;
import ae.pcfc.etks.online.common.vo.TrakheesIdAndPINVO;

public interface SingleClientCompanyDAO {
	
	/**
	 * add
	 * Method to add an Client company request domain object
	 * @param companyReq
	 * @return
	 * String
	 */
	public String add(ClientCompanyReq companyReq);
	
	/**
	 * findSCCompanyByTrakheesId
	 * Method to find the client company by trakhees id
	 * @param trakheesId
	 * @return
	 * TTscClientCompany
	 */
	public TTscClientCompany findSCCompanyByTrakheesId(String trakheesId);
	
	/**
	 * getPinCodeByTrakheesId
	 * Method to find the pin associated with a trakhees id
	 * @param trakheesId
	 * @return
	 * String
	 */
	public String getPinCodeByTrakheesId(String trakheesId);
	
	/**
	 * findTrkheesIdAndPinByEmail
	 * Method to find the trakheees id and pin associated with an email address
	 * @param email
	 * @return
	 * TrakheesIdAndPINVO
	 */
	public TrakheesIdAndPINVO findTrkheesIdAndPinByEmail(String email);
	
	/**
	 * validateLicense
	 * Method to validate license - if the license number is already registered with any client
	 * @param licenseVO
	 * @return
	 * boolean
	 */
	public boolean validateLicense(LicenseVO licenseVO);

	/**
	 * findSCCompanyByVO
	 * Method to find the client company domain by searching with a nonClientCompanyVO whose fields will be used for filtering
	 * @param nonClientCompanyVO
	 * @return
	 * List<TTscClientCompany>
	 */
	public List<TTscClientCompany> findSCCompanyByVO(NonClientCompanyVO nonClientCompanyVO);
	
	/**
	 * validateClientName
	 * Method to validate whether client name is already registerd with any client
	 * @param clientNameVO
	 * @return
	 * boolean
	 */
	public boolean validateClientName(ClientNameVO clientNameVO);
	
	/**
	 * getClientCategory
	 * Method to get the list of client categories available for the client type (Company/Person)
	 * @param clientType
	 * @return
	 * List<TTscClientCategory>
	 */
	public List<TTscClientCategory> getClientCategory(String clientType);
	
	/**
	 * getClientCategoryById
	 * Method to find the client category domain object by category id
	 * @param categoryId
	 * @return
	 * TTscClientCategory
	 */
	public TTscClientCategory getClientCategoryById(String categoryId);
	
	/**
	 * getClientLicenseTypeByCode
	 * Method to find the client license type domain object by license type code
	 * @param licenseTypeCode
	 * @return
	 * TTscLicType
	 */
	public TTscLicType getClientLicenseTypeByCode(String licenseTypeCode);
	
	/**
	 * searchCompany
	 * Method to find the list of companies by searching with a SearchCriteriaCompanyVO which contains the filtering fields with values
	 * @param searchCriteriaCompanyVO
	 * @return
	 * List<TTscClientCompany>
	 */
	public List<TTscClientCompany> searchCompany(SearchCriteriaCompanyVO searchCriteriaCompanyVO);

	/**
	 * findActivitiesOfClientCompany
	 * Method to find the list of activities of a client company by searching with a searchcritieria activity which contains the filtering fileds with values
	 * @param searchCriteriaActivityVO
	 * @return
	 * List<ActivityVO>
	 */
	public List<ActivityVO> findActivitiesOfClientCompany(SearchCriteriaActivityVO searchCriteriaActivityVO);

	public String updateClientCompanyStatus(ClientCompanyReq companyReq, String strTrakheesId);
}
